
import bark.Bark;
import bark.BarkRecognizer;
import doors.DogDoor;
import remote.Remote;

public class DogDoorSimulator {
    public static void main(String[] args) {
        DogDoor door = new DogDoor();
        door.addAlowdedBark(new Bark("hauu"));
        door.addAlowdedBark(new Bark("Hrauu"));
        door.addAlowdedBark(new Bark("hauhauu"));
        door.addAlowdedBark(new Bark("hauuuuu"));

        BarkRecognizer recognizer = new BarkRecognizer(door);
        Remote remote = new Remote(door);

        System.out.println("Brus zaczyna szczekać");
        recognizer.recognize(new Bark("hauu"));

        System.out.println("Brus wyszedł na zewnątrz");

        try {
            Thread.sleep(10000);
        }
        catch (InterruptedException e) {}
        System.out.println("Brus zrobił kupę");
        System.out.println("ale utknął na zewnątrz");

        System.out.println("Mały pies zaczął szczekać");
        recognizer.recognize(new Bark("hiaaau"));

        try {
            Thread.sleep(5000);
        }
        catch (InterruptedException e) {}

        System.out.println("Brus zaczyna szzekać");
        recognizer.recognize(new Bark("hauu"));

        System.out.println("Bruce jest w domu.");
    }
}